package com.isyscore.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isyscore.entity.SysPermissionEntity;
import com.isyscore.entity.SysRoleEntity;
import com.isyscore.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: liuxq@isyscore.com
 * @Date: 2021-04-16 09:45:14
 * @Description: 系统用户DAO
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUserEntity> {

    /**
     * 通过用户ID查询角色集合
     *
     * @Param userId 用户ID
     * @Return List<SysRoleEntity> 角色名集合
     */
    List<SysRoleEntity> selectSysRoleByUserId(Long userId);

    /**
     * 通过用户ID查询权限集合
     *
     * @Param userId 用户ID
     * @Return List<SysPermissionEntity> 角色名集合
     */
    List<SysPermissionEntity> selectSysPermissionByUserId(Long userId);

}
